package com.netease.nie.dao;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.netease.nie.mapper.RobGoodsPeriodPersonTimeMapper;
import com.netease.nie.model.RobGoodsPeriodPersonTime;

@Repository
public class RobGoodsPeriodPersonTimeDao {
	
	@Resource
	private RobGoodsPeriodPersonTimeMapper robGoodsPeriodPersonTimeMapper;
	
	public List<RobGoodsPeriodPersonTime> queryRobGoodsPeriodPersonTimesByDisplayPeriodAndUserId(
			int displayPeriod, long userId) {
		return robGoodsPeriodPersonTimeMapper.queryRobGoodsPeriodPersonTimesByDisplayPeriodAndUserId(displayPeriod, userId);
	}
	
	public List<RobGoodsPeriodPersonTime> queryRobGoodsPeriodPersonTimesByDisplayPeriod(int displayPeriod) {
		return robGoodsPeriodPersonTimeMapper.queryRobGoodsPeriodPersonTimesByDisplayPeriod(displayPeriod);
	}
	
	public int insertRobGoodsPeriodPersonTime(RobGoodsPeriodPersonTime robGoodsPeriodPersonTime) throws Exception {
		return robGoodsPeriodPersonTimeMapper.insertRobGoodsPeriodPersonTime(robGoodsPeriodPersonTime);
	}
	
	public List<RobGoodsPeriodPersonTime> queryRobGoodsPeriodPersonTimesByUserIdAndRobGoodsPeriodIds(long userId, List<Integer> robGoodsPeriods) {
		return robGoodsPeriodPersonTimeMapper.queryRobGoodsPeriodPersonTimesByUserIdAndRobGoodsPeriodIds(userId, robGoodsPeriods);
	}
	
}
